package com.itheima.demo5;

import java.io.*;
import java.nio.charset.Charset;

public class IODemo15 {
    public static void main(String[] args) throws IOException {
        PrintStream ps = new PrintStream(new FileOutputStream("a.txt"),true,Charset.forName("UTF-8"));
        ps.println(97);
        ps.println("阿珍");
        ps.close();

        PrintWriter pw = new PrintWriter(new FileWriter("a.txt"), true);
        pw.println(97);
        pw.println("阳伟");

        pw.close();

    }
}
